<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Home.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Aga.Psad.Mvc.Models.Clientes.ClienteViewModel>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Clientes
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="sidebar">
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="box-style3">
            <tr>
                <td>
                    <h2>
                        <span>Adm.</span> de Clientes</h2>
                </td>
            </tr>
            <tr>
                <td>
                    <ul>
                        <li class="first"><a href="<%= VirtualPathUtility.ToAbsolute("~/Clientes/Index") %>">
                            Ver Clientes</a></li>
                        <li><a href="<%= VirtualPathUtility.ToAbsolute("~/Clientes/Create") %>">Nuevo Cliente</a></li>
                    </ul>
                </td>
            </tr>
        </table>
    </div>
    <div id="content">
        <div id="Div1">
            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="box-style1">
                <tr>
                    <td id="box2">
                        <h2>
                            Clientes</h2>
                        <p class="addNew">
                            <%= Html.ActionLink("Nuevo", "Create")%>
                        </p>
                        <table class="abm">
                            <tr>
                                <th>
                                    Id
                                </th>
                                <th>
                                    Raz&oacute;n Social
                                </th>
                                <th>
                                    Cuit
                                </th>
                                <th>
                                    Usuario
                                </th>
                                <th>
                                    Ex Id
                                </th>
                                <th>
                                </th>
                            </tr>
                            <% if (Model.Count() == 0)
                               { %>
                            <tr>
                                <td colspan="4">
                                    No hay datos para mostrar
                                </td>
                            </tr>
                            <% }
                               else
                               {
                                   foreach (var item in Model)
                                   { %>
                            <tr>
                                <td>
                                    <%= Html.Encode(item.Id)%>
                                </td>
                                <td>
                                    <%= Html.Encode(item.RazonSocial)%>
                                </td>
                                <td>
                                    <%= Html.Encode(item.Cuit)%>
                                </td>
                                <td>
                                    <%= Html.Encode(item.Usuario)%>
                                </td>
                                <td>
                                    <%= Html.Encode(item.ExId)%>
                                </td>
                                <td>
                                    <%= Html.ActionLink("Eliminar", "Remove", new { id = item.Id })%>
                                    |
                                    <%= Html.ActionLink("Editar", "Edit", new { id = item.Id })%>
                                    |
                                    <%= Html.ActionLink("Detalles", "Details", new { id = item.Id })%>
                                </td>
                            </tr>
                            <% 
                                }
                               } %>
                        </table>
                    </td>
                </tr>
            </table>
        </div>
    </div>
</asp:Content>
